package com.seawaterbt.ssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seawaterbt.ssm.config.DataSource;
import com.seawaterbt.ssm.config.DataSourceEnum;
import com.seawaterbt.ssm.entity.BasHousehold;
import com.seawaterbt.ssm.entity.CzBasCrew;
import com.seawaterbt.ssm.mapper.CzBasHouseholdMapper;
import com.seawaterbt.ssm.service.CzBasHouseholdService;
import com.seawaterbt.ssm.service.CzDatCrewdataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ycc
 * @since 2019-06-04
 */
@Service
public class CzBasHouseholdServiceImpl extends ServiceImpl<CzBasHouseholdMapper, BasHousehold> implements CzBasHouseholdService {

    @Autowired
    CzDatCrewdataService czDatCrewdataService;

    @DataSource(DataSourceEnum.DB2)
    @Override
    public BasHousehold listOne(String code) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("code",code);
        return this.getOne(wrapper);
    }
    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<BasHousehold> list(Wrapper<BasHousehold> queryWrapper) {
        return super.list(queryWrapper);
    }
}
